cargo.git
11 years agoauto merge of #423 : alexcrichton/cargo/cargo-package, r=brson
bors [Wed, 27 Aug 2014 02:17:17 +0000 (02:17 +0000)]
auto merge of #423 : alexcrichton/cargo/cargo-package, r=brson

This command will assemble the current package into a tarball ready for
uploading to the cargo registry. Currently no further verification is done
beyond packaging the local repository into a tarball, but in the future this
could execute other operations such as api stability tools.

11 years agoImplement cargo-package
Alex Crichton [Fri, 18 Jul 2014 15:40:45 +0000 (08:40 -0700)]
Implement cargo-package

This command will assemble the current package into a tarball ready for
uploading to the cargo registry. Currently no further verification is done
beyond packaging the local repository into a tarball, but in the future this
could execute other operations such as api stability tools.

11 years agoauto merge of #435 : alexcrichton/cargo/issue-431, r=brson
bors [Wed, 27 Aug 2014 02:00:57 +0000 (02:00 +0000)]
auto merge of #435 : alexcrichton/cargo/issue-431, r=brson

This option is used to disable the --test flag to rustc for a test or benchmark
target in order to signal that the binary already knows how to run the testing
infrastructure.

The test/benchmark is still compiled and run as usual, and the exit code is
expected to reflect the result of the test/benchmark.

Closes #431

11 years agoHelp debug a flaky windows test
Alex Crichton [Wed, 27 Aug 2014 01:58:58 +0000 (18:58 -0700)]
Help debug a flaky windows test

11 years agoAdd a `harness` manifest option
Alex Crichton [Mon, 25 Aug 2014 12:54:47 +0000 (05:54 -0700)]
Add a `harness` manifest option

This option is used to disable the --test flag to rustc for a test or benchmark
target in order to signal that the binary already knows how to run the testing
infrastructure.

The test/benchmark is still compiled and run as usual, and the exit code is
expected to reflect the result of the test/benchmark.

Closes #431

11 years agoauto merge of #420 : alexcrichton/cargo/issue-393-2, r=brson
bors [Wed, 27 Aug 2014 01:40:01 +0000 (01:40 +0000)]
auto merge of #420 : alexcrichton/cargo/issue-393-2, r=brson

This commit removes all distributed executables except for `cargo`. All
builtin subcommands are implemented through library calls, and the fallback
methods are retained to maintain extensability through new subcommands.

Closes #393

11 years agoRemove all subcommand executables
Alex Crichton [Thu, 21 Aug 2014 16:24:34 +0000 (09:24 -0700)]
Remove all subcommand executables

This commit removes all distributed executables except for `cargo`. All
builtin subcommands are implemented through library calls, and the fallback
methods are retained to maintain extensability through new subcommands.

Closes #393

11 years agoauto merge of #421 : alexcrichton/cargo/issue-418, r=wycats
bors [Wed, 27 Aug 2014 01:13:22 +0000 (01:13 +0000)]
auto merge of #421 : alexcrichton/cargo/issue-418, r=wycats

11 years agoauto merge of #419 : alexcrichton/cargo/issue-406, r=brson
bors [Wed, 27 Aug 2014 01:04:59 +0000 (01:04 +0000)]
auto merge of #419 : alexcrichton/cargo/issue-406, r=brson

This allows tests to be built, but not run.

Closes #406

11 years agoFix `cargo run` for renamed bin targets
Alex Crichton [Fri, 22 Aug 2014 16:53:56 +0000 (09:53 -0700)]
Fix `cargo run` for renamed bin targets

11 years agoAdd a --no-run option to `cargo test`
Alex Crichton [Thu, 21 Aug 2014 21:09:27 +0000 (14:09 -0700)]
Add a --no-run option to `cargo test`

This allows tests to be built, but not run.

11 years agoauto merge of #450 : alexcrichton/cargo/fix-cargo, r=alexcrichton
bors [Wed, 27 Aug 2014 00:24:01 +0000 (00:24 +0000)]
auto merge of #450 : alexcrichton/cargo/fix-cargo, r=alexcrichton

11 years agoFix a flaky test while the compiler is changing
Alex Crichton [Wed, 27 Aug 2014 00:21:45 +0000 (17:21 -0700)]
Fix a flaky test while the compiler is changing

11 years agoPrint out the rustc version before each build
Alex Crichton [Wed, 27 Aug 2014 00:21:15 +0000 (17:21 -0700)]
Print out the rustc version before each build

11 years agoFix building with current rust
Björn Steinbrink [Tue, 26 Aug 2014 18:55:39 +0000 (20:55 +0200)]
Fix building with current rust

11 years agoauto merge of #434 : alexcrichton/cargo/issue-433, r=huonw
bors [Mon, 25 Aug 2014 13:44:11 +0000 (13:44 +0000)]
auto merge of #434 : alexcrichton/cargo/issue-433, r=huonw

All subprocesses will now be invoked with CARGO_MANIFEST_DIR pointing at the root of the
source directory that they are working on (compiling). This commit also
reorganizes the version environment variables to use the new infrastructure.

Closes #433

11 years agoAdd a new CARGO_MANIFEST_DIR environment variable
Alex Crichton [Mon, 25 Aug 2014 12:40:47 +0000 (05:40 -0700)]
Add a new CARGO_MANIFEST_DIR environment variable

All subprocesses will now be invoked with CARGO_MANIFEST_DIR pointing at the
root of the source directory that they are working on (compiling). This commit
also reorganizes the version environment variables to use the new
infrastructure.

Closes #433

11 years agoauto merge of #430 : aochagavia/cargo/mod, r=alexcrichton
bors [Sun, 24 Aug 2014 20:59:09 +0000 (20:59 +0000)]
auto merge of #430 : aochagavia/cargo/mod, r=alexcrichton

Example:

```
use std::fmt;
use std::fmt::Show;
```

becomes

```
use std::fmt::{mod, Show};
```

11 years agoUse `mod` where possible
Adolfo Ochagavía [Sat, 23 Aug 2014 19:06:04 +0000 (21:06 +0200)]
Use `mod` where possible

Example:

```
use std::fmt;
use std::fmt::Show;
```

becomes

```
use std::fmt::{mod, Show};
```

11 years agoauto merge of #428 : garrison/cargo/patch-3, r=alexcrichton
bors [Sat, 23 Aug 2014 18:29:10 +0000 (18:29 +0000)]
auto merge of #428 : garrison/cargo/patch-3, r=alexcrichton

travis-ci now supports "language: rust", which eliminates the need to call rustup.sh in .travis.yml. See http://www.reddit.com/r/rust/comments/2ecocp/travis_ci_supports_rust/ for details.

This is the same change as #425, but on the master branch in guide.md, not guide.html.

11 years agoUpdate guide.md to use "language: rust" in .travis.yml
Jim Garrison [Sat, 23 Aug 2014 18:18:03 +0000 (11:18 -0700)]
Update guide.md to use "language: rust" in .travis.yml

travis-ci now supports "language: rust", which eliminates the need to call rustup.sh in .travis.yml. See http://www.reddit.com/r/rust/comments/2ecocp/travis_ci_supports_rust/ for details.

11 years agoauto merge of #415 : alexcrichton/cargo/in-tree-docs, r=wycats
bors [Thu, 21 Aug 2014 17:20:50 +0000 (17:20 +0000)]
auto merge of #415 : alexcrichton/cargo/in-tree-docs, r=wycats

There's a bunch of travis config now to rebuild the website whenever something is merged into master.

11 years agoAdd all docs in-tree
Alex Crichton [Thu, 21 Aug 2014 16:54:53 +0000 (09:54 -0700)]
Add all docs in-tree

11 years agoauto merge of #410 : alexcrichton/cargo/fix-doctest-with-dep, r=wycats
bors [Wed, 20 Aug 2014 18:29:03 +0000 (18:29 +0000)]
auto merge of #410 : alexcrichton/cargo/fix-doctest-with-dep, r=wycats

The movement of tests to the main `target` directory forgot to update a spot
where rustdoc used a -L flag.

Closes #411

11 years agoauto merge of #412 : ScriptDevil/cargo/default-help, r=alexcrichton
bors [Wed, 20 Aug 2014 17:44:04 +0000 (17:44 +0000)]
auto merge of #412 : ScriptDevil/cargo/default-help, r=alexcrichton

Most modern command line utilities print usage/help when invoked without any arguments.

cargo (prior to this patch) defaults to saying "no such subcommand" when invoked without arguments.
> $ cargo
> No such subcommand

With this patch, it will instead print the help message
> $ cargo
> Rust's package manager
>
> Usage:
> ...

11 years agoPrint help message if cargo is invoked with no arguments
Ashok Gautham [Wed, 20 Aug 2014 17:04:39 +0000 (22:34 +0530)]
Print help message if cargo is invoked with no arguments

11 years agoFix doc tests for libs with deps
Alex Crichton [Tue, 19 Aug 2014 20:10:55 +0000 (13:10 -0700)]
Fix doc tests for libs with deps

The movement of tests to the main `target` directory forgot to update a spot
where rustdoc used a -L flag.

11 years agoauto merge of #409 : alexcrichton/cargo/snapshots, r=alexcrichton
bors [Tue, 19 Aug 2014 19:55:37 +0000 (19:55 +0000)]
auto merge of #409 : alexcrichton/cargo/snapshots, r=alexcrichton

11 years agoRegister new snapshots
Alex Crichton [Tue, 19 Aug 2014 19:52:41 +0000 (12:52 -0700)]
Register new snapshots

11 years agoauto merge of #408 : alexcrichton/cargo/fix-master, r=alexcrichton
bors [Tue, 19 Aug 2014 18:54:07 +0000 (18:54 +0000)]
auto merge of #408 : alexcrichton/cargo/fix-master, r=alexcrichton

11 years agoFix some flaky tests on the buildbots
Alex Crichton [Tue, 19 Aug 2014 18:51:02 +0000 (11:51 -0700)]
Fix some flaky tests on the buildbots

11 years agoauto merge of #390 : alexcrichton/cargo/revert-libgit2, r=wycats
bors [Tue, 19 Aug 2014 16:21:40 +0000 (16:21 +0000)]
auto merge of #390 : alexcrichton/cargo/revert-libgit2, r=wycats

It has been discovered that the windows builders aren't building a libgit2 with support for SSL, so cloning https repos on windows is broken with libgit2. It doesn't look easy to sort out, so in the meantime this PR reverts the switch to libgit2 and adds @wycats's fixes from the related PR.

11 years agoSyncs submodules after remote update (closes #370)
Tim Carey-Smith [Fri, 15 Aug 2014 22:12:14 +0000 (15:12 -0700)]
Syncs submodules after remote update (closes #370)

Previously, the Git code avoided cloning a local copy of the local
database for a repository if the repo already existed (and instead tried
to fetch). However, fetching does not sync and reinitialize submodules,
which would require more work.

To avoid this problem, and possibly other subtle updating issues in the
future, the code now wipes the local clone whenever it detects that the
HEAD of a particular branch has changed. This avoids subtle
inconsistencies between fresh clones and updates.

Note: This only affects local-to-local clones. It does not initiate any
new network activity. It may require some additional disk usage, but
only when a remote fetch that was already happening discovers new
commits on the checked-out branch.

11 years agoRevert "Use libgit2 for driving git instead of the CLI"
Alex Crichton [Sun, 17 Aug 2014 07:10:23 +0000 (00:10 -0700)]
Revert "Use libgit2 for driving git instead of the CLI"

This reverts commit 3cd82ed7a191c4adb954704e9396368863eccddf.

Conflicts:
src/cargo/sources/git/utils.rs

11 years agoauto merge of #384 : alexcrichton/cargo/issue-379, r=wycats
bors [Tue, 19 Aug 2014 06:49:09 +0000 (06:49 +0000)]
auto merge of #384 : alexcrichton/cargo/issue-379, r=wycats

Mainly targeted at incremental build times.

11 years agoMake a timing test a little less flaky
Alex Crichton [Tue, 19 Aug 2014 05:51:14 +0000 (22:51 -0700)]
Make a timing test a little less flaky

11 years agoAllow updating transitive deps
Alex Crichton [Sat, 16 Aug 2014 01:25:12 +0000 (18:25 -0700)]
Allow updating transitive deps

Previously `cargo update foo` would only update the package `foo` if it were a
direct dependency of the local package. This meant that to update a transitive
dependency you would have to update the top-level dependency.

This commit adds the ability to update any dependency by name, regardless of
where it is in the dependency graph. This commit is a bit lossy in terms of
behavior. We are guaranteed that the set of immediate dependencies for any one
package have unique names, but not for the entire package graph. This means that
when you invoke `cargo update foo` it could possibly update two packages named
`foo`.

I believe this behavior to be acceptable for now and we can add a more stringent
update syntax later (something like `cargo update --namespace foo bar`). I
believe we'll always want this CLI usage, however.

11 years agoPreserve $OUT_DIR across rebuilds
Alex Crichton [Sat, 16 Aug 2014 01:15:13 +0000 (18:15 -0700)]
Preserve $OUT_DIR across rebuilds

The original choice for completely destroying $OUT_DIR was to focus on
repeatable builds to ensure that stale items in $OUT_DIR don't affect later
compilations. This commit moves this responsibility from cargo to the build
command itself.

Build commands are now responsible for cleaning out old artifacts and ensuring
that when invoked the state of $OUT_DIR is as it would be if it started with an
empty $OUT_DIR. This will allow for very long build commands based on `make` to
have a much faster incremental build time as they won't have to rebuild
everything when updated.

This can cause non-repeatable builds with build commands if stale artifacts are
never removed (but still used in the rust compilation step), but this will now
be considered a bug in the build command rather than for cargo itself.

Closes #382

11 years agoAdd an exclude key to the manifest
Alex Crichton [Sat, 16 Aug 2014 00:57:16 +0000 (17:57 -0700)]
Add an exclude key to the manifest

This key is used to help determine the set of input files for a package. The
normal method (via walking or git ls-files) is filtered via all the patterns
provided in `exclude` of the project section.

The toml key is a string array corresponding to a set of glob patterns according
to the syntax of libglob (provided in the standard distribution). The set of
files normally found will be filtered by each pattern, and if any pattern
matches then the path is excluded.

This will later on be used for `cargo package` when generating a tarball to get
uploaded.

11 years agoFactor in .gitignore for build cmd freshness
Alex Crichton [Sat, 16 Aug 2014 00:40:08 +0000 (17:40 -0700)]
Factor in .gitignore for build cmd freshness

When testing the freshness of a build command, the fingerprint of an entire
package is generated. The current method of fingerprinting a path source is to
just stat() the entire tree and look at mtimes. This works fine when the build
command places *all* output in the build directory.

Some systems, like autotools, place *most* output in the build directory and
some output in the source directory, however (see spidermonkey). In this case
the coarse-grained "consider all files in a directory as input" is too painful
for the build command as the package will forever be rebuilt.

This commit adds support for filtering the list of files in a directory
considered to be part of a package by using `git ls-files`. This git-specific
logic can be extended to other VCSs when cargo grows support for them.

Closes #379

11 years agoauto merge of #401 : alexcrichton/cargo/issue-348, r=wycats
bors [Tue, 19 Aug 2014 06:32:54 +0000 (06:32 +0000)]
auto merge of #401 : alexcrichton/cargo/issue-348, r=wycats

This commit changes the hash of Profile to only take into account
flags/variables that affect the actual output file itself (as opposed to its
location), and then changes cargo {test, build, doc} to all use the same
directory of output (in order to share deps).

This will cause a `cargo build` to remove all of the tests generated by `cargo
test`, but it speeds up the cycle of `cargo test` followed by a `cargo build` by
not needing to rebuild all dependencies.

Additionally, `cargo bench` now shares the same directory as
`cargo build --release` for the same reasons as above.

Closes #348

11 years agoDon't build docs/tests into separate dirs
Alex Crichton [Tue, 19 Aug 2014 04:38:04 +0000 (21:38 -0700)]
Don't build docs/tests into separate dirs

This commit changes the hash of Profile to only take into account
flags/variables that affect the actual output file itself (as opposed to its
location), and then changes cargo {test, build, doc} to all use the same
directory of output (in order to share deps).

This will cause a `cargo build` to remove all of the tests generated by `cargo
test`, but it speeds up the cycle of `cargo test` followed by a `cargo build` by
not needing to rebuild all dependencies.

Additionally, `cargo bench` now shares the same directory as
`cargo build --release` for the same reasons as above.

Closes #348

11 years agoauto merge of #389 : alexcrichton/cargo/dev-dependency-lockfile, r=wycats
bors [Tue, 19 Aug 2014 05:56:43 +0000 (05:56 +0000)]
auto merge of #389 : alexcrichton/cargo/dev-dependency-lockfile, r=wycats

Previously an invocation of `cargo build` would generate a lockfile *without*
dev dependencies, but an invocation of `cargo test` would generate a lockfile
*with* dependencies. This causes odd problems and diffs with the lockfile.

This commit switches the resolve-to-be-a-lockfile to using all dependencies of a
package, while the resolve-to-be-compiled continues to use just the dependencies
needed for the current build.

11 years agoauto merge of #375 : wycats/cargo/doc-fewer-things, r=alexcrichton
bors [Tue, 19 Aug 2014 05:14:53 +0000 (05:14 +0000)]
auto merge of #375 : wycats/cargo/doc-fewer-things, r=alexcrichton

11 years agoauto merge of #402 : alexcrichton/cargo/import-rename, r=alexcrichton
bors [Tue, 19 Aug 2014 05:02:35 +0000 (05:02 +0000)]
auto merge of #402 : alexcrichton/cargo/import-rename, r=alexcrichton

11 years agoMore import renaming fallout
Alex Crichton [Tue, 19 Aug 2014 04:54:12 +0000 (21:54 -0700)]
More import renaming fallout

11 years agoauto merge of #399 : lucidd/cargo/master, r=alexcrichton
bors [Tue, 19 Aug 2014 00:14:11 +0000 (00:14 +0000)]
auto merge of #399 : lucidd/cargo/master, r=alexcrichton

11 years agoChange all uses of `use foo = bar` to `use bar as foo`
Kevin Walter [Mon, 18 Aug 2014 23:54:41 +0000 (01:54 +0200)]
Change all uses of `use foo = bar` to `use bar as foo`

11 years agoauto merge of #394 : colindean/cargo/fix-readme, r=alexcrichton
bors [Mon, 18 Aug 2014 16:14:13 +0000 (16:14 +0000)]
auto merge of #394 : colindean/cargo/fix-readme, r=alexcrichton

When a $ is present, it prevents someone from easily copying and pasting the whole block.

11 years agoauto merge of #395 : bkoropoff/cargo/import-shadow, r=alexcrichton
bors [Mon, 18 Aug 2014 04:44:14 +0000 (04:44 +0000)]
auto merge of #395 : bkoropoff/cargo/import-shadow, r=alexcrichton

- Update toml-rs to version without import shadowing errors
- Fix some import shadowing errors in the tests

11 years agoFix import shadowing errors in tests
Brian Koropoff [Mon, 18 Aug 2014 01:34:50 +0000 (18:34 -0700)]
Fix import shadowing errors in tests

11 years agoUpgrade to latest toml-rs
Brian Koropoff [Mon, 18 Aug 2014 01:33:51 +0000 (18:33 -0700)]
Upgrade to latest toml-rs

This version has a fix for an import shadowing error

11 years agoRemove $ from lines in readme to improve copyability
Colin Dean [Sun, 17 Aug 2014 22:58:07 +0000 (18:58 -0400)]
Remove $ from lines in readme to improve copyability

When a $ is present, it prevents someone from easily copying and
pasting the whole block.

11 years agoAlways generate a lockfile with dev-dependencies
Alex Crichton [Sun, 17 Aug 2014 05:38:32 +0000 (22:38 -0700)]
Always generate a lockfile with dev-dependencies

Previously an invocation of `cargo build` would generate a lockfile *without*
dev dependencies, but an invocation of `cargo test` would generate a lockfile
*with* dependencies. This causes odd problems and diffs with the lockfile.

This commit switches the resolve-to-be-a-lockfile to using all dependencies of a
package, while the resolve-to-be-compiled continues to use just the dependencies
needed for the current build.

11 years agoauto merge of #388 : alexcrichton/cargo/fix-cross-builds, r=burningtree
bors [Sun, 17 Aug 2014 05:19:23 +0000 (05:19 +0000)]
auto merge of #388 : alexcrichton/cargo/fix-cross-builds, r=burningtree

0c834d7b accidentally broke this by favoring rustc's target triple over the
actual target triple.

11 years agoIf --target is specified, pass that to build commands
Alex Crichton [Sun, 17 Aug 2014 05:10:36 +0000 (22:10 -0700)]
If --target is specified, pass that to build commands

0c834d7b accidentally broke this by favoring rustc's target triple over the
actual target triple.

11 years agoauto merge of #367 : alexcrichton/cargo/git2-rs, r=wycats
bors [Sat, 16 Aug 2014 23:18:45 +0000 (23:18 +0000)]
auto merge of #367 : alexcrichton/cargo/git2-rs, r=wycats

In general relying on external programs is dicey and tricky as they're very
different across systems in both how they're used as well as what versions
you'll find. Instead of binding to the least common denominator of CLI, we can
code against an exact version of libgit2.

This introduces a build-time dependency on cmake which libgit2 requires to build
itself, which is unfortunate, but thankfully it's only a build time dep. The
build process for libgit2 also automatically detects as many system libraries as
possible to use (if available), falling back to bundled versions if not
available. I have currently not figured how to control this, so the link-config
package is used to build libgit2 which requires that pkg-config be installed to
build cargo as well.

Closes #138

11 years agoRun cargo off the main thread.
Alex Crichton [Sat, 16 Aug 2014 22:00:38 +0000 (15:00 -0700)]
Run cargo off the main thread.

On windows the main thread suffers the same fate as rustdoc (as linked in the
comments), and hence needs to run off the main thread for now.

11 years agoRegister new snapshots
Alex Crichton [Sat, 16 Aug 2014 20:00:46 +0000 (13:00 -0700)]
Register new snapshots

11 years agoAdd submodule test from #381
Alex Crichton [Sat, 16 Aug 2014 18:20:47 +0000 (11:20 -0700)]
Add submodule test from #381

11 years agoUse libgit2 for driving git instead of the CLI
Alex Crichton [Wed, 6 Aug 2014 15:01:17 +0000 (08:01 -0700)]
Use libgit2 for driving git instead of the CLI

In general relying on external programs is dicey and tricky as they're very
different across systems in both how they're used as well as what versions
you'll find. Instead of binding to the least common denominator of CLI, we can
code against an exact version of libgit2.

This introduces a build-time dependency on cmake which libgit2 requires to build
itself, which is unfortunate, but thankfully it's only a build time dep. The
build process for libgit2 also automatically detects as many system libraries as
possible to use (if available), falling back to bundled versions if not
available. I have currently not figured how to control this, so the link-config
package is used to build libgit2 which requires that pkg-config be installed to
build cargo as well.

Closes #138

11 years agoauto merge of #386 : alexcrichton/cargo/target-always-present, r=wycats
bors [Sat, 16 Aug 2014 19:44:14 +0000 (19:44 +0000)]
auto merge of #386 : alexcrichton/cargo/target-always-present, r=wycats

11 years agoEnsure TARGET is always present for build commands
Alex Crichton [Sat, 16 Aug 2014 19:27:31 +0000 (12:27 -0700)]
Ensure TARGET is always present for build commands

11 years agoauto merge of #372 : jauhien/cargo/master, r=alexcrichton
bors [Sat, 16 Aug 2014 18:01:25 +0000 (18:01 +0000)]
auto merge of #372 : jauhien/cargo/master, r=alexcrichton

- splitn arguments order
- hasmap indexing

Closes #371

11 years agostatic.rust-lang.org may be stale again?
Alex Crichton [Sat, 16 Aug 2014 17:59:52 +0000 (10:59 -0700)]
static.rust-lang.org may be stale again?

11 years agoFix code to be compilable with latest rustc:
Jauhien Piatlicki [Thu, 14 Aug 2014 18:07:05 +0000 (20:07 +0200)]
Fix code to be compilable with latest rustc:
- splitn arguments order

Closes #371

11 years agoMove back to static.rust-lang.org
Alex Crichton [Fri, 15 Aug 2014 06:16:18 +0000 (23:16 -0700)]
Move back to static.rust-lang.org

The mac bots have been fixed

11 years agoauto merge of #369 : alexcrichton/cargo/issue-327, r=wycats
bors [Fri, 15 Aug 2014 04:28:57 +0000 (04:28 +0000)]
auto merge of #369 : alexcrichton/cargo/issue-327, r=wycats

The syntax was originally chosen to perhaps allow multiple libraries in the future, but that is less and less likely to happen at this point. This commit deprecates the now-misleading `[[lib]]` in favor of `[lib]` to indicate that only one can be present.

This does not start allowing `[bin]` or `[example]` and such as I felt that it was too many ways to specify what's essentially the same thing. This also as a bonus allows a top-level `bin = []` to completely opt-out of binary inference (as well as for tests and examples).

Closes #327

11 years agoauto merge of #378 : wycats/cargo/fix-git-issues, r=alexcrichton
bors [Fri, 15 Aug 2014 04:07:00 +0000 (04:07 +0000)]
auto merge of #378 : wycats/cargo/fix-git-issues, r=alexcrichton

11 years agoauto merge of #307 : erickt/cargo/bench, r=wycats
bors [Fri, 15 Aug 2014 04:00:13 +0000 (04:00 +0000)]
auto merge of #307 : erickt/cargo/bench, r=wycats

This adds initial support for benchmarking at `--opt-level=3` for cargo. It's run just like `cargo-test`, and can actually run tests at the higher optimization level with `cargo bench -- --test`.

One question I had though is if we should include the `-Zlto` for link time optimizations. I'm not sure how well supported that is. What do you all think?

11 years agoauto merge of #366 : steveklabnik/cargo/get_to_subscript, r=alexcrichton
bors [Fri, 15 Aug 2014 03:46:34 +0000 (03:46 +0000)]
auto merge of #366 : steveklabnik/cargo/get_to_subscript, r=alexcrichton

This fixes the build, which was broken due to the warnings.

11 years agoMac builder DNS is still stale, use S3 urls
Alex Crichton [Fri, 15 Aug 2014 03:36:53 +0000 (20:36 -0700)]
Mac builder DNS is still stale, use S3 urls

11 years agoFix issues related to git updates
Yehuda Katz + Carl Lerche [Fri, 15 Aug 2014 00:05:01 +0000 (17:05 -0700)]
Fix issues related to git updates

We observed that after updating the git repo in a test, unless we waited
for 1s, we got intermittent cases where a subsequent update of the git
source would not pick up the changes.

We observed this both with the git CLI and the branch using libgit2.
There may be a better solution, but we did not find it.

11 years agoRemove docs that shouldn't be built
Tim Carey-Smith [Thu, 14 Aug 2014 21:54:56 +0000 (14:54 -0700)]
Remove docs that shouldn't be built

11 years agoreplace "\n\n" with real newlines in test output
Erick Tryzelaar [Thu, 14 Aug 2014 15:15:04 +0000 (08:15 -0700)]
replace "\n\n" with real newlines in test output

11 years agowip: Add `cargo-bench`, which runs benchmarks at --opt-level=3
Erick Tryzelaar [Thu, 14 Aug 2014 15:14:34 +0000 (08:14 -0700)]
wip: Add `cargo-bench`, which runs benchmarks at --opt-level=3

11 years agoDeprecated [[lib]] in favor of [lib]
Alex Crichton [Thu, 14 Aug 2014 06:08:02 +0000 (23:08 -0700)]
Deprecated [[lib]] in favor of [lib]

11 years agoStart accepting [lib], allow `bin = []`
Alex Crichton [Thu, 14 Aug 2014 06:02:08 +0000 (23:02 -0700)]
Start accepting [lib], allow `bin = []`

This commit starts to accept `[lib]` as a single library per package. It also
allows opting-out of binaries/tests/examples with a top level `foo = []` rather
than taking an empty array to mean that inference should be enabled.

cc #327

11 years agoreplace .get() with .[]
Erick Tryzelaar [Thu, 14 Aug 2014 03:51:40 +0000 (20:51 -0700)]
replace .get() with .[]

11 years ago.get() -> []
Steve Klabnik [Tue, 12 Aug 2014 14:02:01 +0000 (10:02 -0400)]
.get() -> []

This fixes the build, which was broken due to the warnings.

11 years agoauto merge of #365 : alexcrichton/cargo/new-snapshots, r=alexcrichton
bors [Tue, 12 Aug 2014 06:54:26 +0000 (06:54 +0000)]
auto merge of #365 : alexcrichton/cargo/new-snapshots, r=alexcrichton

11 years agoRegister new snapshots
Alex Crichton [Tue, 12 Aug 2014 05:04:43 +0000 (22:04 -0700)]
Register new snapshots

11 years agoauto merge of #363 : alexcrichton/cargo/fix-some-bugs, r=wycats
bors [Tue, 12 Aug 2014 04:31:21 +0000 (04:31 +0000)]
auto merge of #363 : alexcrichton/cargo/fix-some-bugs, r=wycats

This also pulls in #316 to land everything at the same time. The major fix is "Fix updating git sources when a new lockfile is committed", and everything else was just issues that had accumulated over time. Once this has landed (may take some finesse), I'll make a new snapshot so cargo can actually start properly updating itself.

11 years agoFix the --list tests for windows
Alex Crichton [Tue, 12 Aug 2014 04:22:29 +0000 (21:22 -0700)]
Fix the --list tests for windows

11 years agoTake a different strategy than ^{object}
Alex Crichton [Tue, 12 Aug 2014 00:05:22 +0000 (17:05 -0700)]
Take a different strategy than ^{object}

Apparently that syntax only exists in more recent versions of git, not older
versions (like those present on the buildbots).

11 years agoFix a flaky test (due to hashes changing)
Alex Crichton [Mon, 11 Aug 2014 05:08:57 +0000 (22:08 -0700)]
Fix a flaky test (due to hashes changing)

11 years agoMerge commit 'xanxys/master' into fix-some-bugs
Alex Crichton [Mon, 11 Aug 2014 05:07:15 +0000 (22:07 -0700)]
Merge commit 'xanxys/master' into fix-some-bugs

11 years agoAdd a configure option to disable cross-tests
Alex Crichton [Mon, 11 Aug 2014 05:04:15 +0000 (22:04 -0700)]
Add a configure option to disable cross-tests

The tests are enabled by default and must be opted out of.

Closes #346

11 years agoDon't always print an error on test failures
Alex Crichton [Mon, 11 Aug 2014 04:48:43 +0000 (21:48 -0700)]
Don't always print an error on test failures

Only print a failure if the command didn't have an exit status. Also, clarify
the failure message in the case that an exit was detected but it was not a
successful status.

Closes #350

11 years agoDon't pull in dev-deps for `cargo build`
Alex Crichton [Mon, 11 Aug 2014 04:36:29 +0000 (21:36 -0700)]
Don't pull in dev-deps for `cargo build`

Also don't pull them in for `cargo doc`, but continue to pull them in for
`cargo run` and `cargo test`.

Closes #351

11 years agoDisable doctests separately from tests
Alex Crichton [Mon, 11 Aug 2014 04:27:17 +0000 (21:27 -0700)]
Disable doctests separately from tests

This adds a `doctest = false` option to the `Cargo.toml` config for a target to
disable doc tests for the target. Notably `test = false` does not disable this
as it is separately toggleable.

Closes #353

11 years agoSupport --target with `cargo test`
Alex Crichton [Mon, 11 Aug 2014 04:12:32 +0000 (21:12 -0700)]
Support --target with `cargo test`

Closes #356

11 years agoFix `cargo clean` when not in the root dir
Alex Crichton [Mon, 11 Aug 2014 04:01:59 +0000 (21:01 -0700)]
Fix `cargo clean` when not in the root dir

Closes #361

11 years agoFix updating git sources a new lockfile is committed
Alex Crichton [Sun, 10 Aug 2014 05:53:25 +0000 (22:53 -0700)]
Fix updating git sources a new lockfile is committed

This is the actual fix for #345

11 years agoUpdate rust-encoding
Alex Crichton [Sun, 10 Aug 2014 04:05:33 +0000 (21:05 -0700)]
Update rust-encoding

Closes #357

11 years agoAdd "--list" option to `cargo`, that shows lists of installed (sub)commands by searching
xanxys [Sat, 9 Aug 2014 05:37:50 +0000 (14:37 +0900)]
Add "--list" option to `cargo`, that shows lists of installed (sub)commands by searching
directories for executables with name cargo-*.

11 years agoauto merge of #347 : alexcrichton/cargo/snapshots, r=new
bors [Fri, 8 Aug 2014 05:03:07 +0000 (05:03 +0000)]
auto merge of #347 : alexcrichton/cargo/snapshots, r=new

11 years agoRegister new snapshots
Alex Crichton [Fri, 8 Aug 2014 04:59:27 +0000 (21:59 -0700)]
Register new snapshots

11 years agoauto merge of #341 : alexcrichton/cargo/doc-test-tweaks, r=wycats
bors [Fri, 8 Aug 2014 03:54:44 +0000 (03:54 +0000)]
auto merge of #341 : alexcrichton/cargo/doc-test-tweaks, r=wycats

11 years agoMake sure version env vars are always present
Alex Crichton [Thu, 7 Aug 2014 15:42:16 +0000 (08:42 -0700)]
Make sure version env vars are always present

They were accidentally left out of the `rustdoc --test` stage which caused
crates not to be able to be compiled.